Add Xcode build system integration with Tier 2 hot-reload#32
Merged
Conversation
- XcodeBuildSystem: detect .xcodeproj, build via xcodebuild, parse build settings, collect source files from OutputFileMap.json (Tier 2) with Tier 1 fallback. Uses -F (framework search path) for compiler flags. - Fix Tier 1 module name bug: bridge dylib now uses PreviewBridge_<name> to avoid "file is part of module X; ignoring import" self-import error. - Fail with ambiguousTarget error when multiple schemes exist and none match the source file path, listing available schemes for the user. - Register in BuildSystemDetector (priority: SPM > Bazel > Xcode) - Add 14 unit tests for detection, scheme picking, build settings parsing, search paths parsing, OutputFileMap collection, and detector priority. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- parseBuildSettings: stop at second "Build settings for" header to avoid conflating settings from multiple targets in the same scheme - Remove unused ProjectInfo.targets field - Verify BUILT_PRODUCTS_DIR exists instead of assuming .framework product type (supports app targets, static libraries, etc.) - Simplify parseSearchPaths to basic split + quote strip + filter - Use Set for deduplicating framework search paths - Rename misleading test, add multi-target parsing test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Anticipates future examples/xcworkspace directory for workspace support (#34). Updates all references in skills, READMEs, and docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
XcodeBuildSystemimplementing theBuildSystemprotocol for.xcodeprojprojects.xcodeprojby walking up directories, builds viaxcodebuild build -configuration Debug -quietOutputFileMap.jsonparsing, with Tier 1 fallback-F(framework search path) for compiler flags instead of-I(Xcode produces frameworks)PreviewBridge_<name>to avoid self-import errorambiguousTargeterror listing available schemes when multiple exist with no path matchBuildSystemDetectorwith priority: SPM > Bazel > XcodeTest plan
swift buildcompilesswift test— all 69 tests pass (31 in BuildSystem suite)swift-format lint --strictcleanexamples/xcode/viapreview_startCloses #16
🤖 Generated with Claude Code